import java.awt.Graphics2D;

/**
 * Class for creating an oval 
 * 
 * @author Chia-Chi (Teresa) Lee
 */
public class Oval extends MyShape {
  
  public Oval(int x_s, int x_e, int y_s, int y_e){
    super(x_s,x_e,y_s,y_e);
  }
  
  /**
   * Method for drawing a oval
   * 
   */
  @Override
  public void drawMe(Graphics2D g, int screenWidth, int screenHeight) {
    int width = this.getX_e() - this.getX_s();
    int x = width < 0 ? this.getX_e() : this.getX_s();
    int height = this.getY_e() - this.getY_s();
    int y = height < 0 ? this.getY_e() : this.getY_s();
    g.drawOval(x,y,Math.abs(width),Math.abs(height));
  }
  
}